Single maven project#1268
Draft
whit2333 wants to merge 1 commit into
Draft
Conversation
…cation
Wave 1 of the Maven merge plan (.sisyphus/plans/maven-merge.md):
T1: Pre-merge baseline build (./build-coatjava.sh -T4 --unittests
--nomaps --nonets -Dmaven.test.failure.ignore=true)
- coat-libs-13.8.4-SNAPSHOT.jar: 24210 classes captured
- manifest: 5 entries (Implementation-Version=13.8.4-SNAPSHOT etc)
- 33 services jars in install tree
- 4 known pre-existing test failures (DC, EB, CVT reconstruction;
AHDC pytorch loader): documented as baseline for T27 parity
T2: cnuphys/numRec orphan: DECISION = ABSORB-AS-SOURCE
(in-tree sources 2025-11-17 are newer than 2014 external artifact)
T3: META-INF/services SPI: 0 entries, 0 collisions (no
ServicesResourceTransformer needed in T9 shade plugin)
T4: Main resources: 294 files, 0 in-jar path collisions
T5: Test FQNs: 13 classes across 8 modules, 0 collisions
T6: coat-libs downstream consumers: 5 direct Maven deps in 3 repos
(mon12, clas12calibration-dc, clas12alignment); 0 manifest readers
found (-> T29 manifest parity bar is ADVISORY)
T7: Dependency analyzer audit: 4 mandatory new ignore entries
(vectorgraphics2d, exp4j, jamapack, jMath); 3 optional for JavaFX
classifier mismatch. Critical caveats: must preserve jevio
classifier=jar-with-dependencies and pytorch-native-cpu
classifier=linux-x86_64 when authoring T8 root pom.xml.
Refs: plan tasks T1-T7 (Wave 1)
build(merge): create unified root pom.xml (T8)
Replace 50-POM multi-module aggregator with a single-module root pom.xml:
- groupId/artifactId: org.jlab.coat:coatjava (per interview D6)
- packaging: jar (was pom)
- Removed <modules> block
- Added <distributionManagement> ported from reconstruction/coat-libs POMs
- Added union of all external <dependencies> from the 50 child POMs
(internal coords filtered per .sisyphus/evidence/task-7 audit; numRec
was ABSORB-AS-SOURCE per T2 so dropped; f2jutil kept as external)
- Preserved <dependencyManagement>, <repositories>, <properties>,
enforcer/compiler/jar/jacoco/javadoc/spotbugs plugin config verbatim
- Ported reconstruction/alert/pom.xml copy-dependencies execution
(copies ai.djl runtime jars into target/lib/services for runtime SPI)
- Preserved skip-tests profile (default-active)
- flatten-maven-plugin / maven-deploy-plugin remain in pluginManagement
awaiting T10 wiring
- maven-shade-plugin NOT YET ported (T9 will)
- maven-dependency-plugin analyze-only ignoredUnusedDeclaredDependencies
not yet expanded (T11 will, per T7 audit)
JavaFX deps carry classifier=linux to match the existing
<dependencyManagement> entries (else Maven rejects them as missing
version). T11 may revisit when running analyze-only end-to-end.
Validation:
mvn -N validate => BUILD SUCCESS
Effective POM written to .sisyphus/evidence/task-8/effective-pom.xml
Only external cnuphys ref is cnuphys:f2jutil.
build(merge): port maven-shade-plugin execution to root POM (T9)
Adds shade-coat-libs execution at package phase that attaches a secondary
artifact (classifier=coat-libs) alongside the primary thin coatjava jar.
Adaptations from pre-merge common-tools/coat-libs/pom.xml:
Artifact excludes:
- DROPPED: cnuphys:cnuphys, cnuphys:jogl-all, cnuphys:jogl, cnuphys:gluegen
Those classes are not reachable transitively in the current build:
baseline coat-libs jar has 0 entries under com/jogamp, org/jogamp, or
cnuphys/ced. The old excludes were defensive against historical
transitive resolutions that no longer occur. Confirmed by
.sisyphus/evidence/task-1-baseline/coat-libs-classes.txt.
- KEPT: org.jlab.coda:jclara, org.jacoco
- ADDED: ai.djl:*, ai.djl.pytorch:*
Reason: ai.djl is declared in the merged root POM (was previously only
in reconstruction/alert/pom.xml) so shade would now pull it into
coat-libs unless excluded. The pre-merge baseline coat-libs has no
ai/djl/* entries, and ai.djl jars are delivered to coatjava/lib/services/
via maven-dependency-plugin copy-dependencies (added in T8).
Filters (META-INF/*.SF/*.DSA/*.RSA, META-INF/maven/**, module-info.class,
IDE files): ported verbatim (9 entries).
ManifestResourceTransformer:
- Specification-Title / Implementation-Title hard-coded to literal
'coat-libs' (NOT ${project.artifactId} which is now 'coatjava'),
preserving the pre-merge manifest contents byte-for-byte for T29.
- Implementation-Vendor-Id = ${project.groupId} = 'org.jlab.coat'
(matches pre-merge since coat-libs was already 'org.jlab.coat').
- Specification-Version / Implementation-Version unchanged.
Secondary-artifact attach strategy (shadedArtifactAttached=true +
shadedClassifierName=coat-libs) produces target/coatjava-<v>-coat-libs.jar.
T20 (build-coatjava.sh) renames this to coat-libs-<v>.jar when installing
to coatjava/lib/clas/, and T24 (deploy-coatjava.sh) handles the deploy.
createDependencyReducedPom=false - flatten-maven-plugin (wired in T10) is
the authority on the published POM.
Validation:
mvn -N validate => BUILD SUCCESS
Full class-list parity check is T28 (after sources merged in T12-T18).
build(merge): activate flatten-maven-plugin under build/plugins (T10)
Moves flatten-maven-plugin and maven-deploy-plugin from <pluginManagement>
into <build><plugins> so they execute on this single-module project
(pluginManagement entries do nothing unless explicitly declared by a
plugin block, which made sense for the multi-module aggregator but not
for the merged jar project).
Flatten config:
- flattenMode=fatjar (matches pre-merge coat-libs)
- bound to package phase
- writes target/.flattened-pom.xml
maven-deploy-plugin config:
- pomFile=${project.build.directory}/.flattened-pom.xml
- deploy-coatjava.sh (T24) will use `mvn deploy:deploy-file
-DpomFile=.flattened-pom.xml` when publishing the coat-libs uber-jar
with its own GAV coordinates (org.jlab.coat:coat-libs:<version>).
pluginManagement block kept (empty) for future per-execution overrides.
Validation:
mvn -N validate => BUILD SUCCESS
Full flatten output verification deferred until T27 (after sources
merged + first full package phase runs).
build(merge): expand ignoredUnusedDeclaredDependencies for merged scope (T11)
Per the T7 audit (.sisyphus/evidence/task-7/analyzer-audit.md), four
additional unused-declared ignores are required to prevent the
maven-dependency-plugin analyze-only execution from failing
`mvn verify` post-merge. These artifacts were declared in the pre-merge
common-tools/coat-libs/pom.xml (which had analyzer skipped) and now appear
as top-level deps of the merged project; they have zero compile imports
under src/main/java because they're shaded into coat-libs solely for
downstream consumers (mon12, iguana, clas12calibration-dc, clas12alignment):
- de.erichseifert:vectorgraphics2d (vector graphics export)
- net.objecthunter:exp4j (expression parser)
- org.jama:jamapack (legacy Jampack/* linalg)
- org.jlab.plugins:jMath (legacy geometry/vector API)
JavaFX classifier mismatch (javafx-base/graphics/fxml :linux variant vs
bare coord) does NOT need ignore entries because T8 already declares
the deps with <classifier>linux</classifier> matching the
<dependencyManagement> entries.
Validation:
mvn -N validate => BUILD SUCCESS
Full analyzer run is part of T27 (needs compiled classes).
refactor(merge): git mv common-tools sources into src/main/java (T12)
Moves 628 tracked files from common-tools/<mod>/src/main/java/** into
src/main/java/** to consolidate the project under a single source tree.
Includes 619 .java files, 1 README.md, and 8 .java-BAK editor backups
(left tracked from upstream; relocated for history continuity).
Scope: common-tools modules except cnuphys/* (handled by T14).
Excluded: stale .swp editor swap file (untracked).
No file content changes; pure renames. History preserved via git mv.
Plan: .sisyphus/plans/maven-merge.md T12
refactor(merge): git mv common-tools resources into src/main/resources (T13)
Moves 294 tracked resource files from common-tools/<mod>/src/main/resources/**
into src/main/resources/**. Source modules: clara-io (9), clas-io (13),
clas-jcsg (268), clas-logging (3), coat-libs (1). Excludes cnuphys/* (T14).
No collisions (T4 inventory confirmed 0 in-jar path collisions). Pure
renames, no content changes.
Plan: .sisyphus/plans/maven-merge.md T13
refactor(merge): git mv cnuphys sources into src/main/java (T14)
Moves 539 .java files into src/main/java/**:
- magfield (46), snr (20), splot (116), swimmer (100) from cnuphys subs
using standard src/main/java layout
- numRec (257) absorbed as source per T2 decision (ABSORB-AS-SOURCE),
moving src/com/nr/** -> src/main/java/com/nr/**
Scope: java files only. 25 non-.java tracked files (build.xml, .gitignore
fragments) intentionally left behind in cnuphys sub directories; they are
Ant/legacy debris with no role in the merged Maven project and will be
removed by T19 (child-POM + empty-dir cleanup). Top-level build.xml
collision (magfield vs splot vs swimmer) is avoided by this exclusion.
numRec test/com/nr/test/** (308 files) remains for T17 (tests).
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T14
refactor(merge): git mv reconstruction sources into src/main/java (T15)
Moves 408 tracked source files from reconstruction/<mod>/src/main/java/**
into src/main/java/**:
- 404 .java files across 26 modules (urwell has none — only stale Eclipse
files; one excluded by content type)
- 4 package.html Javadoc package descriptions (rtpc x3, vtx x1) — moved
alongside their packages so javadoc continues to pick them up
Scope: .java + package.html. 9 non-source files (.gitignore, README.md,
Figs/*.png in mc module, .java-DISABLED, .java.old) intentionally left
behind for T19 cleanup; they are operational debris with no role in the
Maven source set.
Cross-layer dep (clas-decay-tools -> clas12detector-vtx) auto-resolves
with this merge per plan (H1).
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T15
refactor(merge): git mv tests into src/test/java (T17)
Moves 13 .java test classes from */src/test/java/** into src/test/java/**,
exactly matching the FQN inventory captured by T5 (zero diff).
Source breakdown (matches T5):
common-tools/clas-detector x2 (org.jlab.detector.base.*Test)
common-tools/clas-physics x3 (org.jlab.clas.physics.*Test)
reconstruction/alert x2 (AHDCTest, ATOFTest)
reconstruction/cvt x1 (CVTReconstructionTest)
reconstruction/dc x1 (DCReconstructionTest)
reconstruction/eb x1 (EBReconstructionTest)
reconstruction/ec x1 (ECReconstructionTest)
reconstruction/ft x2 (FTEBEngineTest, FTTRKEngineTest)
DELIBERATE EXCLUSION: numRec/test/com/nr/test/** (308 JUnit 4 files) is
NOT moved into src/test/java. Rationale:
- These tests never ran under the pre-merge multi-module build because
numRec uses Ant (build.xml), not Maven. Surefire never saw them.
- Absorbing them now would violate the parity acceptance criterion
("Total Surefire test count equals sum of per-module pre-merge counts")
by suddenly executing 308 additional tests that have never been
validated in CI.
- The numRec test files will be removed in T19 alongside other cnuphys
Ant-era debris (build.xml, ExpectedAllTests.xml, INSTALL.txt, etc.).
- T2's ABSORB-AS-SOURCE decision covered the production code under
numRec/src/com/nr; the test/ tree is a separate, never-exercised
fixture set whose absorption was not part of T2's scope.
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T17
chore(merge): record Wave 3 (T12-T18) evidence + learnings
Per-task evidence directories:
- task-12: 628 common-tools renames (619 .java + 9 misc tracked)
- task-13: 294 common-tools resource renames (zero collisions)
- task-14: 539 cnuphys + numRec source renames (.java only;
leftover-non-java.txt enumerates the 25 deferred items)
- task-15: 408 reconstruction renames (.java + package.html);
leftover.txt enumerates the 9 deferred items
- task-16: NO-OP (no reconstruction main resources)
- task-17: 13 test renames, exact FQN parity with T5 baseline;
new-test-fqns.txt diffs zero against task-5/test-fqns.txt
- task-18: NO-OP (no test resources anywhere in repo)
Learnings notepad updated with per-task results and T19 hand-off:
- Leftover items (49 child POMs, 308 numRec/test files, 25 cnuphys
non-.java, 9 reconstruction non-source, empty dirs)
- Open questions (numRec LICENSE.txt, mc/Figs handling)
- Anti-pattern (top-level build.xml collision recovery)
Plan: .sisyphus/plans/maven-merge.md Wave 3 closeout
docs(merge): mark Wave 3 tasks (T12-T18) complete in plan
build(merge): simplify version-bump.sh for single-module layout (T22)
Drop -DprocessAllModules=true; the merged project has only one POM.
CLI interface unchanged.
Plan: .sisyphus/plans/maven-merge.md T22
build(merge): simplify build-javadocs.sh for single-module layout (T23)
Replace `mvn javadoc:aggregate -pl '!org.jlab.coat:coat-libs'` with
`mvn javadoc:javadoc`. Single-module project produces equivalent
aggregate output at the same destination path.
Plan: .sisyphus/plans/maven-merge.md T23
build(merge): update jacoco-aggregate.sh for single target/ tree (T25)
The merged single-module build produces target/site/jacoco/ directly;
per-module aggregation is no longer needed. Output path preserved for
docs site CI compatibility.
Plan: .sisyphus/plans/maven-merge.md T25
refactor(merge): preserve license/docs/disabled-source files before T19 cleanup
Relocates 9 tracked files that were left behind by Wave 3 (T14/T15) and
that have legal/documentation value worth keeping. These could not move
in the original .java-only mv waves but should land alongside their
package contexts before T19 deletes their parent directories:
License + attribution (Numerical Recipes derivative):
common-tools/cnuphys/numRec/LICENSE.txt -> src/main/java/com/nr/LICENSE.txt
common-tools/cnuphys/numRec/NAMES.txt -> src/main/java/com/nr/NAMES.txt
Developer documentation (mc truth-matching service):
reconstruction/mc/src/main/java/org/jlab/service/mc/README.md
reconstruction/mc/src/main/java/org/jlab/service/mc/Figs/*.png (4 files)
Disabled-source samples (intentionally kept by developers):
reconstruction/ec/src/main/java/org/jlab/display/ec/ECPion.java-DISABLED
reconstruction/ec/src/main/java/org/jlab/service/swim/SwimEngine.java.old
All renames; no content changes. T19 will then delete remaining Ant/IDE
debris and the 49 child POMs.
Plan: .sisyphus/plans/maven-merge.md T19 (preservation phase)
chore(merge): remove Ant-era debris and stale stubs (T19 step 2/3)
Deletes 340 files that have no role in the merged Maven project:
numRec (308 + 3 = 311 files):
- test/com/nr/test/**/*.java (308 JUnit 4 tests that never ran pre-merge
because numRec uses Ant, not Maven; absorbing them would have broken
the test-count parity bar per T17 commit rationale)
- build.xml, INSTALL.txt, ExpectedAllTests.xml (Ant-build artifacts;
LICENSE.txt and NAMES.txt preserved in previous commit)
cnuphys non-source files (25 files):
- build.xml x 4 (Ant scripts in magfield/snr/splot/swimmer/src/main/java/
that collided at src/main/java/build.xml during T14 attempt)
- 21 nested .gitignore stubs inside cnuphys subs' source trees
reconstruction stubs (2 files):
- htcc/src/main/java/org/jlab/{rec,service}/htcc/.gitignore
Stale cnuphys subdirectories (2 files):
- apache/.gitignore (stub only, no other contents)
- coatjava/etc/bankdefs/hipo/FMT.json (orphan; canonical bank defs are
at etc/bankdefs/hipo4/ per AGENTS.md)
All affected items inventoried in:
.sisyphus/evidence/task-14/leftover-non-java.txt (cnuphys)
.sisyphus/evidence/task-15/leftover.txt (reconstruction; 7 items
relocated in previous commit, 2 .gitignore deleted here)
Plan: .sisyphus/plans/maven-merge.md T19 (debris cleanup)
build(merge): remove 49 obsolete child pom.xml files (T19 step 3/3)
Deletes all child POMs now that the source trees have been consolidated
into src/main/java, src/main/resources, and src/test/java under the root
pom.xml (authored in T8).
Breakdown of the 49 deleted POMs:
- 3 aggregator POMs: common-tools/pom.xml,
common-tools/cnuphys/pom.xml,
reconstruction/pom.xml
- 16 common-tools leaf POMs (clas-* + swim-tools + coat-libs + clara-io)
- 5 cnuphys leaf POMs (magfield, snr, splot, swimmer, + the splot one
which already declared cnuphys:numRec — that
declaration goes away with the POM since numRec
is now an internal source set per T2/T14)
- 26 reconstruction leaf POMs (ai, alert, band, bg, calib, cnd, cvt, dc,
eb, ec, fmt, ft, htcc, ltcc, mc, mltn,
mu, postproc, raster, recoil, rich, rtpc,
swaps, tof, uber, urwt, vtx)
- reconstruction/urwell has no pom (already noted in Wave 1 inventory)
Post-deletion: find . -name pom.xml -not -path './coatjava/*' -not
-path '*/target/*' | wc -l = 1 (just the root pom.xml).
Full list: .sisyphus/evidence/task-19/pomlist.txt
Plan: .sisyphus/plans/maven-merge.md T19 (POM deletion)
build(merge): update deploy-coatjava.sh for single artifact root (T24)
Replace the two-POM deploy loop (common-tools/coat-libs/pom.xml +
reconstruction/pom.xml) with a single `mvn deploy:deploy-file` invocation
against the root POM's shaded artifact.
Selected Option B (explicit deploy:deploy-file) rather than Option A
(rely on default deploy lifecycle). Rationale: the shade plugin attaches
the uber-jar as a CLASSIFIER of the primary artifact, so a plain
`mvn deploy` would publish org.jlab.coat:coatjava:<v>:jar:coat-libs
(classifier) rather than the freestanding GAV org.jlab.coat:coat-libs:<v>
that downstream consumers (iguana, mon12, clas12calibration-dc,
clas12alignment, ...) actually depend on. Option A would silently break
those consumers; Option B keeps the published GAV byte-equivalent.
Companion change to root pom.xml: add <skip>true</skip> to
maven-deploy-plugin so the default deploy lifecycle no longer attempts
to publish the wrong GAVs. The thin coatjava-<v>.jar is therefore NOT
published to clas12maven — matching today's downstream-consumer surface,
where only coat-libs is the official downstream artifact (per AGENTS.md
release section).
Also removed the now-dead scp line for org/jlab/clas12/detector/* — those
GAVs cease to publish post-merge (T19 deleted the reconstruction/*
modules; their source is shaded into coat-libs).
Tarball + scp logic for coat-libs and the coatjava-<v>.tar.gz install
tree unchanged.
Evidence: .sisyphus/evidence/task-24/decision.md
Plan: .sisyphus/plans/maven-merge.md T24
build(merge): update build-coatjava.sh install loop for single-module layout (T20)
Replaces the per-module install_jars loop with a direct copy from the
single root target/ directory:
for f in target/coatjava-*-coat-libs.jar:
cp -> lib/clas/coat-libs-<v>.jar (rename: strip 'coatjava-' prefix
and '-coat-libs' classifier infix;
preserves the file name iguana /
mon12 / clas12calibration-dc
expect)
for f in target/coatjava-*.jar (excluding -coat-libs, -sources, -javadoc):
cp -> lib/services/ (the thin jar; new in this PR)
The shade plugin (pom.xml maven-shade-plugin block, T9) attaches the
uber-jar as a CLASSIFIER of the primary 'coatjava' artifact rather than
as a freestanding 'coat-libs' artifactId — see pom.xml comment at line
700-703 explaining why. As a result, target/ contains
'coatjava-<v>-coat-libs.jar' (classifier file naming) and this install
loop renames it on copy to the historical 'coat-libs-<v>.jar' that the
classpath order in libexec/env.sh (verified at line 26) and downstream
consumers depend on.
Helper install_jars() is removed (no longer referenced; per-module loop
was its only caller, both per-module loops are gone after T19 deleted
49 child POMs).
Unchanged:
- All CLI flag handling and the --depana/--xrootd error guards
- The clean_prefixes / mkdir / cp -r {bin,etc,libexec} setup
- bankSplit.py invocation
- maven-dependency-plugin jclara copy into lib/utils
- mvn install invocation (with/without --unittests)
- spotbugs invocation
- target/ warning loop in --clean (still finds the single root target/)
- install-clara invocation
- final SUCCESS message
Verified:
- bash -n build-coatjava.sh exits 0
- --depana and --xrootd still rejected with their existing error messages
- --help still works
- install_jars no longer referenced anywhere
- no stale 'find reconstruction|common-tools -name pom.xml' patterns
Plan: .sisyphus/plans/maven-merge.md T20
chore(merge): record Wave 4 (T19-T26) evidence
Per-task evidence directories:
- task-19: pomlist.txt (49 deleted), postcount.txt (= 1), empty-dirs.txt
- task-20: build-coatjava.sh diff (install loop rewrite, 21+/23-)
- task-21: NO-OP.md (libexec/env.sh already correct, no edit needed)
- task-22: bump.log (version-bump.sh smoke test)
- task-23: build-javadocs.sh diff (3-line simplification)
- task-25: jacoco-aggregate.sh diff + rationale (43 -> 37 lines)
- task-26: NO-OP.md (CI workflow already free of stale module paths)
(task-24 evidence committed by its agent in 88c4eccfd.)
Plan: .sisyphus/plans/maven-merge.md Wave 4 closeout
docs(merge): mark Wave 4 (T19-T26) complete + update learnings
Plan checkboxes flipped for T19, T20, T21 (NO-OP), T22, T23, T24
(Option B), T25, T26 (NO-OP).
Learnings notepad gets a Wave 4 section covering:
- 8 commits summary
- 3 critical discoveries (shade classifier mismatch, dead scp,
install_jars dead code)
- T19 scope decisions (preserved vs deleted vs not-touched)
- Open follow-ups for post-merge cleanup
Plan: .sisyphus/plans/maven-merge.md Wave 4 closeout
build(merge): pom.xml fixes from T27 build + T28 class-list parity
Two issues surfaced during T27/T28 verification:
1. **Surefire workingDirectory** (lines 569-583): 6 tests (ATOFTest,
AHDCTest, CVTReconstructionTest, DCReconstructionTest,
EBReconstructionTest, ECReconstructionTest) hard-code
System.setProperty("CLAS12DIR", "../../") which worked pre-merge
when Surefire ran from reconstruction/<mod>/ but resolves to the
parent of the repo post-merge. Setting workingDirectory to
target/surefire-cwd (auto-created by Surefire) restores the legacy
path math without touching test sources.
Result: T1 baseline had 4 pre-existing test failures (EB, CVT, AHDC,
DC). Post-merge T27 with this fix has the SAME 4 failures + no new
regressions. Test count parity restored.
2. **Shade plugin exclusions** (lines 723-738 + new filter block 781-832):
T28 class-list diff initially showed +2049 classes in the new shaded
jar. Root cause: post-merge the root POM declares the UNION of all
pre-merge module deps (T8), pulling in commons-{io,codec,compress},
jna, and jakarta.annotation transitively. Pre-merge
common-tools/coat-libs/pom.xml only depended on a narrow set
(clas-*, swim-tools, snr, jevio, jamapack, ...), so those transitives
never reached the shaded jar. Additionally, ALL reconstruction module
classes (org/jlab/{rec,service,display,calibration}/*) now compile
into a single target/classes/ and were leaking into the shade.
Fix:
- Added 5 external-dep artifact-level excludes for the new transitives
(net.java.dev.jna:jna, org.apache.commons:commons-compress,
commons-codec, commons-io, jakarta.annotation:jakarta.annotation-api)
- Added project-self filter excluding 45 reconstruction submodule
package roots under org/jlab/rec/, org/jlab/service/, org/jlab/display/,
org/jlab/calibration/. EXCEPTIONS (kept in coat-libs per H1
cross-layer dep): org/jlab/rec/vtx/** and org/jlab/service/vtx/** —
pre-merge clas-decay-tools depended on clas12detector-vtx, dragging
vtx classes in transitively. Verified by baseline: 8 vtx .class
entries present pre-merge, preserved post-merge.
Result: T28 diff went from 2049 lines -> 0 lines. coat-libs class
list is BYTE-IDENTICAL to pre-merge (24,210 entries).
T29 manifest parity: 5 of 7 *Title/*Version/*Vendor-Id entries match
exactly; soft 2-line delta in informational per-section block
(Name: + artifactId: now reflect project.artifactId = 'coatjava' instead
of pre-merge 'coat-libs'). NOT a parity blocker per plan line 39
('manifest version entries preserved') and T6 evidence (no consumer
reads any manifest field).
Plan: .sisyphus/plans/maven-merge.md T27 + T28 + T29
Evidence: .sisyphus/evidence/task-{27,28,29}/
build(merge): install ai.djl runtime jars into lib/services (T31 fix)
T31 (EB integration test) surfaced NoClassDefFoundError for
ai/djl/translate/Translator when AHDCEngine.init() ran. Root cause:
T20's install loop only copied target/coatjava-*.jar variants and
missed the ai.djl runtime jars deposited at target/lib/services/ by
the copy-djl-runtime-jars execution in pom.xml.
Pre-merge, these jars came from reconstruction/alert/target/lib/
services/ via the per-module install_jars() walk. Post-merge, the
single root target/ has them at target/lib/services/; this commit
adds the explicit copy.
Verified: coatjava/lib/services/ now contains 6 ai.djl jars
(api, model-zoo, pytorch-{engine,jni,model-zoo,native-cpu}).
NoClassDefFoundError resolved on retry; AHDCEngine reaches model
loading (and fails with the same pre-existing PytorchStreamReader
issue as T1 baseline — environment-specific nnet data corruption,
not a merge regression).
Plan: .sisyphus/plans/maven-merge.md T31
build(merge): T35 deploy dry-run fixes (skip scope + generatePom + surefire pin)
T35 (deploy-coatjava.sh dry-run) surfaced three issues:
1. **Default-execution-scoped deploy skip** (pom.xml maven-deploy-plugin):
The plugin-level <skip>true</skip> from T24 was suppressing
*every* invocation of maven-deploy-plugin including the explicit
CLI `deploy:deploy-file` call from deploy-coatjava.sh. Symptom:
"Skipping artifact deployment" with no artifacts produced.
Fix: scope <skip>true</skip> inside <execution id=default-deploy>
so it applies only to the lifecycle-bound execution; direct-mojo
invocations remain functional.
2. **deploy-file -DpomFile path was wrong** (deploy-coatjava.sh):
The script referenced `target/.flattened-pom.xml` but
flatten-maven-plugin writes to repo root (`./.flattened-pom.xml`),
AND the flattened POM has artifactId=coatjava while deploy needs
artifactId=coat-libs. Symptom: "Error reading POM
target/.flattened-pom.xml" then GAV mismatch.
Fix: drop -DpomFile entirely, use -DgeneratePom=true so deploy:
deploy-file synthesizes a minimal POM from the GAV CLI args. Result
matches pre-merge published POM byte-for-byte (empty diff vs
~/.m2/repository/org/jlab/coat/coat-libs/13.8.4-SNAPSHOT/
coat-libs-13.8.4-SNAPSHOT.pom after version substitution).
3. **maven-surefire-plugin version unpinned** (pom.xml): caused
"build.plugins.plugin.version for org.apache.maven.plugins:
maven-surefire-plugin is missing" warning. Pinned to 3.5.3
(Maven default super-pom shipped 2.12.4 which is the same as T1
baseline; 3.5.3 is the current stable, JDK21-compatible).
T35 retry: PASS. Generated artifacts at
myLocalMvnRepo/org/jlab/coat/coat-libs/13.8.99-TESTMERGE/{jar,pom},
correct GAV, correct file name. Tarball coatjava-13.8.99-TESTMERGE.tar.gz
also produced. Deploy parity verified.
Plan: .sisyphus/plans/maven-merge.md T35
Evidence: .sisyphus/evidence/task-35/dry-run-retry2.log + RESULT.md
chore(merge): Wave 5 (T27-T35) evidence + plan updates
Per-task evidence:
- task-27: build logs (initial, retries with workingDir/shade fixes,
final clean validation showing BUILD SUCCESS + diff=0)
- task-28: class-list parity (24210 == 24210, diff=0 lines)
- task-29: manifest parity + RESULT.md (PASS, soft delta documented)
- task-30: decoder smoke test + RESULT.md (PASS: 100 events -> 689KB hipo)
- task-31: EB integration logs + RESULT.md (env-blocked identical to T1;
uncovered the missing-ai.djl-jars merge bug which was fixed)
- task-33: history-samples.txt (5 samples all trace to pre-2020 commits)
- task-34: NO-OP rationale (skip-tests profile already correct)
- task-35: dry-run logs + RESULT analysis (deploy GAV correct, POM
byte-identical to pre-merge after version substitution)
Plan: T27-T35 checkboxes flipped (T36 remains pending user push).
Learnings: Wave 5 section appended with critical bug catches, deploy
fixes, and acceptance-criteria satisfaction matrix.
Plan: .sisyphus/plans/maven-merge.md Wave 5 closeout
deleted: .sisyphus/boulder.json
deleted: .sisyphus/evidence/module-inventory/mods-with-main-java.txt
deleted: .sisyphus/evidence/module-inventory/mods-with-main-resources.txt
deleted: .sisyphus/evidence/module-inventory/mods-with-test-java.txt
deleted: .sisyphus/evidence/module-inventory/poms-classified.txt
deleted: .sisyphus/evidence/module-inventory/stale-dirs.txt
deleted: .sisyphus/evidence/task-1-baseline/coat-libs-classes-PRELIMINARY.txt
deleted: .sisyphus/evidence/task-1-baseline/coat-libs-classes.txt
deleted: .sisyphus/evidence/task-1-baseline/coat-libs-manifest-PRELIMINARY.txt
deleted: .sisyphus/evidence/task-1-baseline/coat-libs-manifest.txt
deleted: .sisyphus/evidence/task-1-baseline/failing-tests.txt
deleted: .sisyphus/evidence/task-1-baseline/pom-count.txt
deleted: .sisyphus/evidence/task-1-baseline/pom-list.txt
deleted: .sisyphus/evidence/task-1-baseline/pre-merge-sha.txt
deleted: .sisyphus/evidence/task-1-baseline/services-jars-PRELIMINARY.txt
deleted: .sisyphus/evidence/task-1-baseline/services-jars.txt
deleted: .sisyphus/evidence/task-1-baseline/test-count.txt
deleted: .sisyphus/evidence/task-12/M-lines.txt
deleted: .sisyphus/evidence/task-12/history-samples.txt
deleted: .sisyphus/evidence/task-12/leftover-counts.txt
deleted: .sisyphus/evidence/task-12/non-rename-M.txt
deleted: .sisyphus/evidence/task-12/status-summary.txt
deleted: .sisyphus/evidence/task-12/status.txt
deleted: .sisyphus/evidence/task-13/status-summary.txt
deleted: .sisyphus/evidence/task-13/status.txt
deleted: .sisyphus/evidence/task-14/leftover-non-java.txt
deleted: .sisyphus/evidence/task-14/status-summary.txt
deleted: .sisyphus/evidence/task-14/status.txt
deleted: .sisyphus/evidence/task-15/leftover.txt
deleted: .sisyphus/evidence/task-15/status-summary.txt
deleted: .sisyphus/evidence/task-16/NO-OP.md
deleted: .sisyphus/evidence/task-17/new-test-fqns.txt
deleted: .sisyphus/evidence/task-17/status-summary.txt
deleted: .sisyphus/evidence/task-18/NO-OP.md
deleted: .sisyphus/evidence/task-19/empty-dirs.txt
deleted: .sisyphus/evidence/task-19/pomlist.txt
deleted: .sisyphus/evidence/task-19/postcount.txt
deleted: .sisyphus/evidence/task-2/numrec-decision.md
deleted: .sisyphus/evidence/task-20/diff.txt
deleted: .sisyphus/evidence/task-21/NO-OP.md
deleted: .sisyphus/evidence/task-23/diff.txt
deleted: .sisyphus/evidence/task-24/decision.md
deleted: .sisyphus/evidence/task-24/diff.txt
deleted: .sisyphus/evidence/task-25/diff.txt
deleted: .sisyphus/evidence/task-25/rationale.md
deleted: .sisyphus/evidence/task-26/NO-OP.md
deleted: .sisyphus/evidence/task-28/classes-new.txt
deleted: .sisyphus/evidence/task-28/diff.txt
deleted: .sisyphus/evidence/task-29/RESULT.md
deleted: .sisyphus/evidence/task-29/diff.txt
deleted: .sisyphus/evidence/task-29/manifest-new.txt
deleted: .sisyphus/evidence/task-3/services-collisions.md
deleted: .sisyphus/evidence/task-3/services-inventory.txt
deleted: .sisyphus/evidence/task-30/RESULT.md
deleted: .sisyphus/evidence/task-31/RESULT.md
deleted: .sisyphus/evidence/task-33/history-samples.txt
deleted: .sisyphus/evidence/task-34/NO-OP.md
deleted: .sisyphus/evidence/task-4/resources-collisions.md
deleted: .sisyphus/evidence/task-4/resources-inventory.txt
deleted: .sisyphus/evidence/task-5/test-fqn-collisions.txt
deleted: .sisyphus/evidence/task-5/test-fqns-with-paths.txt
deleted: .sisyphus/evidence/task-5/test-fqns.txt
deleted: .sisyphus/evidence/task-6/consumers-raw.json
deleted: .sisyphus/evidence/task-6/consumers-report.md
deleted: .sisyphus/evidence/task-7/analyzer-audit.md
deleted: .sisyphus/evidence/task-7/merge-deps.py
deleted: .sisyphus/evidence/task-8-prep/external-deps-union.txt
deleted: .sisyphus/evidence/task-8-prep/internal-deps-union.txt
deleted: .sisyphus/evidence/task-8/effective-pom.xml
deleted: .sisyphus/evidence/task-8/internal-deps-check.txt
deleted: .sisyphus/notepads/maven-merge/issues.md
deleted: .sisyphus/notepads/maven-merge/learnings.md
deleted: .sisyphus/plans/maven-merge.md
modified: validation/advanced-tests/data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Single maven project. Burned down a rainforest worth of tokens...
Wave 1 of the Maven merge plan (.sisyphus/plans/maven-merge.md):
T1: Pre-merge baseline build (./build-coatjava.sh -T4 --unittests
--nomaps --nonets -Dmaven.test.failure.ignore=true)
- coat-libs-13.8.4-SNAPSHOT.jar: 24210 classes captured
- manifest: 5 entries (Implementation-Version=13.8.4-SNAPSHOT etc)
- 33 services jars in install tree
- 4 known pre-existing test failures (DC, EB, CVT reconstruction; AHDC pytorch loader): documented as baseline for T27 parity T2: cnuphys/numRec orphan: DECISION = ABSORB-AS-SOURCE
(in-tree sources 2025-11-17 are newer than 2014 external artifact)
T3: META-INF/services SPI: 0 entries, 0 collisions (no
ServicesResourceTransformer needed in T9 shade plugin)
T4: Main resources: 294 files, 0 in-jar path collisions T5: Test FQNs: 13 classes across 8 modules, 0 collisions T6: coat-libs downstream consumers: 5 direct Maven deps in 3 repos
(mon12, clas12calibration-dc, clas12alignment); 0 manifest readers
found (-> T29 manifest parity bar is ADVISORY)
T7: Dependency analyzer audit: 4 mandatory new ignore entries
(vectorgraphics2d, exp4j, jamapack, jMath); 3 optional for JavaFX
classifier mismatch. Critical caveats: must preserve jevio
classifier=jar-with-dependencies and pytorch-native-cpu
classifier=linux-x86_64 when authoring T8 root pom.xml.
Refs: plan tasks T1-T7 (Wave 1)
build(merge): create unified root pom.xml (T8)
Replace 50-POM multi-module aggregator with a single-module root pom.xml:
JavaFX deps carry classifier=linux to match the existing entries (else Maven rejects them as missing version). T11 may revisit when running analyze-only end-to-end.
Validation:
mvn -N validate => BUILD SUCCESS
Effective POM written to .sisyphus/evidence/task-8/effective-pom.xml
Only external cnuphys ref is cnuphys:f2jutil.
build(merge): port maven-shade-plugin execution to root POM (T9)
Adds shade-coat-libs execution at package phase that attaches a secondary artifact (classifier=coat-libs) alongside the primary thin coatjava jar.
Adaptations from pre-merge common-tools/coat-libs/pom.xml:
Artifact excludes:
Filters (META-INF/.SF/.DSA/*.RSA, META-INF/maven/**, module-info.class,
IDE files): ported verbatim (9 entries).
ManifestResourceTransformer:
Secondary-artifact attach strategy (shadedArtifactAttached=true + shadedClassifierName=coat-libs) produces target/coatjava--coat-libs.jar. T20 (build-coatjava.sh) renames this to coat-libs-.jar when installing to coatjava/lib/clas/, and T24 (deploy-coatjava.sh) handles the deploy.
createDependencyReducedPom=false - flatten-maven-plugin (wired in T10) is the authority on the published POM.
Validation:
mvn -N validate => BUILD SUCCESS
Full class-list parity check is T28 (after sources merged in T12-T18).
build(merge): activate flatten-maven-plugin under build/plugins (T10)
Moves flatten-maven-plugin and maven-deploy-plugin from into so they execute on this single-module project (pluginManagement entries do nothing unless explicitly declared by a plugin block, which made sense for the multi-module aggregator but not for the merged jar project).
Flatten config:
maven-deploy-plugin config:
mvn deploy:deploy-file -DpomFile=.flattened-pom.xmlwhen publishing the coat-libs uber-jar with its own GAV coordinates (org.jlab.coat:coat-libs:).pluginManagement block kept (empty) for future per-execution overrides.
Validation:
mvn -N validate => BUILD SUCCESS
Full flatten output verification deferred until T27 (after sources
merged + first full package phase runs).
build(merge): expand ignoredUnusedDeclaredDependencies for merged scope (T11)
Per the T7 audit (.sisyphus/evidence/task-7/analyzer-audit.md), four additional unused-declared ignores are required to prevent the maven-dependency-plugin analyze-only execution from failing
mvn verifypost-merge. These artifacts were declared in the pre-merge common-tools/coat-libs/pom.xml (which had analyzer skipped) and now appear as top-level deps of the merged project; they have zero compile imports under src/main/java because they're shaded into coat-libs solely for downstream consumers (mon12, iguana, clas12calibration-dc, clas12alignment):JavaFX classifier mismatch (javafx-base/graphics/fxml :linux variant vs bare coord) does NOT need ignore entries because T8 already declares the deps with linux matching the entries.
Validation:
mvn -N validate => BUILD SUCCESS
Full analyzer run is part of T27 (needs compiled classes).
refactor(merge): git mv common-tools sources into src/main/java (T12)
Moves 628 tracked files from common-tools//src/main/java/** into src/main/java/** to consolidate the project under a single source tree. Includes 619 .java files, 1 README.md, and 8 .java-BAK editor backups (left tracked from upstream; relocated for history continuity).
Scope: common-tools modules except cnuphys/* (handled by T14).
Excluded: stale .swp editor swap file (untracked).
No file content changes; pure renames. History preserved via git mv.
Plan: .sisyphus/plans/maven-merge.md T12
refactor(merge): git mv common-tools resources into src/main/resources (T13)
Moves 294 tracked resource files from common-tools//src/main/resources/** into src/main/resources/**. Source modules: clara-io (9), clas-io (13), clas-jcsg (268), clas-logging (3), coat-libs (1). Excludes cnuphys/* (T14).
No collisions (T4 inventory confirmed 0 in-jar path collisions). Pure renames, no content changes.
Plan: .sisyphus/plans/maven-merge.md T13
refactor(merge): git mv cnuphys sources into src/main/java (T14)
Moves 539 .java files into src/main/java/**:
Scope: java files only. 25 non-.java tracked files (build.xml, .gitignore fragments) intentionally left behind in cnuphys sub directories; they are Ant/legacy debris with no role in the merged Maven project and will be removed by T19 (child-POM + empty-dir cleanup). Top-level build.xml collision (magfield vs splot vs swimmer) is avoided by this exclusion.
numRec test/com/nr/test/** (308 files) remains for T17 (tests).
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T14
refactor(merge): git mv reconstruction sources into src/main/java (T15)
Moves 408 tracked source files from reconstruction//src/main/java/** into src/main/java/**:
Scope: .java + package.html. 9 non-source files (.gitignore, README.md, Figs/*.png in mc module, .java-DISABLED, .java.old) intentionally left behind for T19 cleanup; they are operational debris with no role in the Maven source set.
Cross-layer dep (clas-decay-tools -> clas12detector-vtx) auto-resolves with this merge per plan (H1).
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T15
refactor(merge): git mv tests into src/test/java (T17)
Moves 13 .java test classes from /src/test/java/* into src/test/java/**, exactly matching the FQN inventory captured by T5 (zero diff).
Source breakdown (matches T5):
common-tools/clas-detector x2 (org.jlab.detector.base.*Test)
common-tools/clas-physics x3 (org.jlab.clas.physics.*Test)
reconstruction/alert x2 (AHDCTest, ATOFTest)
reconstruction/cvt x1 (CVTReconstructionTest)
reconstruction/dc x1 (DCReconstructionTest)
reconstruction/eb x1 (EBReconstructionTest)
reconstruction/ec x1 (ECReconstructionTest)
reconstruction/ft x2 (FTEBEngineTest, FTTRKEngineTest)
DELIBERATE EXCLUSION: numRec/test/com/nr/test/** (308 JUnit 4 files) is NOT moved into src/test/java. Rationale:
Pure renames, no content changes. History preserved.
Plan: .sisyphus/plans/maven-merge.md T17
chore(merge): record Wave 3 (T12-T18) evidence + learnings
Per-task evidence directories:
Learnings notepad updated with per-task results and T19 hand-off:
Plan: .sisyphus/plans/maven-merge.md Wave 3 closeout
docs(merge): mark Wave 3 tasks (T12-T18) complete in plan
build(merge): simplify version-bump.sh for single-module layout (T22)
Drop -DprocessAllModules=true; the merged project has only one POM. CLI interface unchanged.
Plan: .sisyphus/plans/maven-merge.md T22
build(merge): simplify build-javadocs.sh for single-module layout (T23)
Replace
mvn javadoc:aggregate -pl '!org.jlab.coat:coat-libs'withmvn javadoc:javadoc. Single-module project produces equivalent aggregate output at the same destination path.Plan: .sisyphus/plans/maven-merge.md T23
build(merge): update jacoco-aggregate.sh for single target/ tree (T25)
The merged single-module build produces target/site/jacoco/ directly; per-module aggregation is no longer needed. Output path preserved for docs site CI compatibility.
Plan: .sisyphus/plans/maven-merge.md T25
refactor(merge): preserve license/docs/disabled-source files before T19 cleanup
Relocates 9 tracked files that were left behind by Wave 3 (T14/T15) and that have legal/documentation value worth keeping. These could not move in the original .java-only mv waves but should land alongside their package contexts before T19 deletes their parent directories:
License + attribution (Numerical Recipes derivative):
common-tools/cnuphys/numRec/LICENSE.txt -> src/main/java/com/nr/LICENSE.txt
common-tools/cnuphys/numRec/NAMES.txt -> src/main/java/com/nr/NAMES.txt
Developer documentation (mc truth-matching service):
reconstruction/mc/src/main/java/org/jlab/service/mc/README.md
reconstruction/mc/src/main/java/org/jlab/service/mc/Figs/*.png (4 files)
Disabled-source samples (intentionally kept by developers):
reconstruction/ec/src/main/java/org/jlab/display/ec/ECPion.java-DISABLED
reconstruction/ec/src/main/java/org/jlab/service/swim/SwimEngine.java.old
All renames; no content changes. T19 will then delete remaining Ant/IDE debris and the 49 child POMs.
Plan: .sisyphus/plans/maven-merge.md T19 (preservation phase)
chore(merge): remove Ant-era debris and stale stubs (T19 step 2/3)
Deletes 340 files that have no role in the merged Maven project:
numRec (308 + 3 = 311 files):
cnuphys non-source files (25 files):
reconstruction stubs (2 files):
Stale cnuphys subdirectories (2 files):
All affected items inventoried in:
.sisyphus/evidence/task-14/leftover-non-java.txt (cnuphys)
.sisyphus/evidence/task-15/leftover.txt (reconstruction; 7 items
relocated in previous commit, 2 .gitignore deleted here)
Plan: .sisyphus/plans/maven-merge.md T19 (debris cleanup)
build(merge): remove 49 obsolete child pom.xml files (T19 step 3/3)
Deletes all child POMs now that the source trees have been consolidated into src/main/java, src/main/resources, and src/test/java under the root pom.xml (authored in T8).
Breakdown of the 49 deleted POMs:
Post-deletion: find . -name pom.xml -not -path './coatjava/' -not -path '/target/*' | wc -l = 1 (just the root pom.xml).
Full list: .sisyphus/evidence/task-19/pomlist.txt
Plan: .sisyphus/plans/maven-merge.md T19 (POM deletion)
build(merge): update deploy-coatjava.sh for single artifact root (T24)
Replace the two-POM deploy loop (common-tools/coat-libs/pom.xml + reconstruction/pom.xml) with a single
mvn deploy:deploy-fileinvocation against the root POM's shaded artifact.Selected Option B (explicit deploy:deploy-file) rather than Option A (rely on default deploy lifecycle). Rationale: the shade plugin attaches the uber-jar as a CLASSIFIER of the primary artifact, so a plain
mvn deploywould publish org.jlab.coat:coatjava:🫙coat-libs (classifier) rather than the freestanding GAV org.jlab.coat:coat-libs: that downstream consumers (iguana, mon12, clas12calibration-dc, clas12alignment, ...) actually depend on. Option A would silently break those consumers; Option B keeps the published GAV byte-equivalent.Companion change to root pom.xml: add true to maven-deploy-plugin so the default deploy lifecycle no longer attempts to publish the wrong GAVs. The thin coatjava-.jar is therefore NOT published to clas12maven — matching today's downstream-consumer surface, where only coat-libs is the official downstream artifact (per AGENTS.md release section).
Also removed the now-dead scp line for org/jlab/clas12/detector/* — those GAVs cease to publish post-merge (T19 deleted the reconstruction/* modules; their source is shaded into coat-libs).
Tarball + scp logic for coat-libs and the coatjava-.tar.gz install tree unchanged.
Evidence: .sisyphus/evidence/task-24/decision.md
Plan: .sisyphus/plans/maven-merge.md T24
build(merge): update build-coatjava.sh install loop for single-module layout (T20)
Replaces the per-module install_jars loop with a direct copy from the single root target/ directory:
for f in target/coatjava--coat-libs.jar:
cp -> lib/clas/coat-libs-.jar (rename: strip 'coatjava-' prefix
and '-coat-libs' classifier infix;
preserves the file name iguana /
mon12 / clas12calibration-dc
expect)
for f in target/coatjava-.jar (excluding -coat-libs, -sources, -javadoc):
cp -> lib/services/ (the thin jar; new in this PR)
The shade plugin (pom.xml maven-shade-plugin block, T9) attaches the uber-jar as a CLASSIFIER of the primary 'coatjava' artifact rather than as a freestanding 'coat-libs' artifactId — see pom.xml comment at line 700-703 explaining why. As a result, target/ contains 'coatjava--coat-libs.jar' (classifier file naming) and this install loop renames it on copy to the historical 'coat-libs-.jar' that the classpath order in libexec/env.sh (verified at line 26) and downstream consumers depend on.
Helper install_jars() is removed (no longer referenced; per-module loop was its only caller, both per-module loops are gone after T19 deleted 49 child POMs).
Unchanged:
Verified:
Plan: .sisyphus/plans/maven-merge.md T20
chore(merge): record Wave 4 (T19-T26) evidence
Per-task evidence directories:
(task-24 evidence committed by its agent in 88c4eccfd.)
Plan: .sisyphus/plans/maven-merge.md Wave 4 closeout
docs(merge): mark Wave 4 (T19-T26) complete + update learnings
Plan checkboxes flipped for T19, T20, T21 (NO-OP), T22, T23, T24 (Option B), T25, T26 (NO-OP).
Learnings notepad gets a Wave 4 section covering:
Plan: .sisyphus/plans/maven-merge.md Wave 4 closeout
build(merge): pom.xml fixes from T27 build + T28 class-list parity
Two issues surfaced during T27/T28 verification:
Surefire workingDirectory (lines 569-583): 6 tests (ATOFTest, AHDCTest, CVTReconstructionTest, DCReconstructionTest, EBReconstructionTest, ECReconstructionTest) hard-code System.setProperty("CLAS12DIR", "../../") which worked pre-merge when Surefire ran from reconstruction// but resolves to the parent of the repo post-merge. Setting workingDirectory to target/surefire-cwd (auto-created by Surefire) restores the legacy path math without touching test sources.
Result: T1 baseline had 4 pre-existing test failures (EB, CVT, AHDC, DC). Post-merge T27 with this fix has the SAME 4 failures + no new regressions. Test count parity restored.
Shade plugin exclusions (lines 723-738 + new filter block 781-832): T28 class-list diff initially showed +2049 classes in the new shaded jar. Root cause: post-merge the root POM declares the UNION of all pre-merge module deps (T8), pulling in commons-{io,codec,compress}, jna, and jakarta.annotation transitively. Pre-merge common-tools/coat-libs/pom.xml only depended on a narrow set (clas-, swim-tools, snr, jevio, jamapack, ...), so those transitives never reached the shaded jar. Additionally, ALL reconstruction module classes (org/jlab/{rec,service,display,calibration}/) now compile into a single target/classes/ and were leaking into the shade.
Fix:
Result: T28 diff went from 2049 lines -> 0 lines. coat-libs class
list is BYTE-IDENTICAL to pre-merge (24,210 entries).
T29 manifest parity: 5 of 7 *Title/*Version/*Vendor-Id entries match exactly; soft 2-line delta in informational per-section block (Name: + artifactId: now reflect project.artifactId = 'coatjava' instead of pre-merge 'coat-libs'). NOT a parity blocker per plan line 39 ('manifest version entries preserved') and T6 evidence (no consumer reads any manifest field).
Plan: .sisyphus/plans/maven-merge.md T27 + T28 + T29
Evidence: .sisyphus/evidence/task-{27,28,29}/
build(merge): install ai.djl runtime jars into lib/services (T31 fix)
T31 (EB integration test) surfaced NoClassDefFoundError for ai/djl/translate/Translator when AHDCEngine.init() ran. Root cause: T20's install loop only copied target/coatjava-*.jar variants and missed the ai.djl runtime jars deposited at target/lib/services/ by the copy-djl-runtime-jars execution in pom.xml.
Pre-merge, these jars came from reconstruction/alert/target/lib/ services/ via the per-module install_jars() walk. Post-merge, the single root target/ has them at target/lib/services/; this commit adds the explicit copy.
Verified: coatjava/lib/services/ now contains 6 ai.djl jars (api, model-zoo, pytorch-{engine,jni,model-zoo,native-cpu}). NoClassDefFoundError resolved on retry; AHDCEngine reaches model loading (and fails with the same pre-existing PytorchStreamReader issue as T1 baseline — environment-specific nnet data corruption, not a merge regression).
Plan: .sisyphus/plans/maven-merge.md T31
build(merge): T35 deploy dry-run fixes (skip scope + generatePom + surefire pin)
T35 (deploy-coatjava.sh dry-run) surfaced three issues:
Default-execution-scoped deploy skip (pom.xml maven-deploy-plugin): The plugin-level true from T24 was suppressing every invocation of maven-deploy-plugin including the explicit CLI
deploy:deploy-filecall from deploy-coatjava.sh. Symptom: "Skipping artifact deployment" with no artifacts produced.Fix: scope true inside
so it applies only to the lifecycle-bound execution; direct-mojo invocations remain functional.
deploy-file -DpomFile path was wrong (deploy-coatjava.sh): The script referenced
target/.flattened-pom.xmlbut flatten-maven-plugin writes to repo root (./.flattened-pom.xml), AND the flattened POM has artifactId=coatjava while deploy needs artifactId=coat-libs. Symptom: "Error reading POM target/.flattened-pom.xml" then GAV mismatch. Fix: drop -DpomFile entirely, use -DgeneratePom=true so deploy: deploy-file synthesizes a minimal POM from the GAV CLI args. Result matches pre-merge published POM byte-for-byte (empty diff vs ~/.m2/repository/org/jlab/coat/coat-libs/13.8.4-SNAPSHOT/ coat-libs-13.8.4-SNAPSHOT.pom after version substitution).maven-surefire-plugin version unpinned (pom.xml): caused "build.plugins.plugin.version for org.apache.maven.plugins: maven-surefire-plugin is missing" warning. Pinned to 3.5.3 (Maven default super-pom shipped 2.12.4 which is the same as T1 baseline; 3.5.3 is the current stable, JDK21-compatible).
T35 retry: PASS. Generated artifacts at
myLocalMvnRepo/org/jlab/coat/coat-libs/13.8.99-TESTMERGE/{jar,pom}, correct GAV, correct file name. Tarball coatjava-13.8.99-TESTMERGE.tar.gz also produced. Deploy parity verified.
Plan: .sisyphus/plans/maven-merge.md T35
Evidence: .sisyphus/evidence/task-35/dry-run-retry2.log + RESULT.md
chore(merge): Wave 5 (T27-T35) evidence + plan updates
Per-task evidence:
Plan: T27-T35 checkboxes flipped (T36 remains pending user push). Learnings: Wave 5 section appended with critical bug catches, deploy fixes, and acceptance-criteria satisfaction matrix.
Plan: .sisyphus/plans/maven-merge.md Wave 5 closeout